/**
 * 
 */
package com.sugou.web.pages;

import java.util.regex.Pattern;

import org.springframework.web.servlet.view.AbstractUrlBasedView;
import org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver;

/**
 * 装载freemarker页面
 * @version 1.0 
 * @author Hunk.Tong &copy; Ustudy 游学网络
 * <b>Create Time:</b>2012-11-20 下午9:02:59
 */
public class GouWuFreeMarkerViewResolver extends FreeMarkerViewResolver {
	
	private Pattern suffixreg=Pattern.compile("\\.\\w+$");
	protected AbstractUrlBasedView buildView(String viewName) throws Exception {
		if(!suffixreg.matcher(viewName).find()){
			viewName+=".html";
		}
		return super.buildView(viewName);
	}
}
